package com.zyy.admin.repo;

import com.zyy.admin.entity.LabelRuleTemplate;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface LabelRuleTemplateRepository
    extends JpaRepository<LabelRuleTemplate, Integer>, JpaSpecificationExecutor<LabelRuleTemplate> {

    List<LabelRuleTemplate> findAllByUserId(Integer userId);
    List<LabelRuleTemplate> findAllByUserIdAndAvailable(Integer userId, Integer available);
    List<LabelRuleTemplate> findAllByNameLike(String name);
}